<?php

/**
 * OntoWiki hierarchy module template
 *
 * @version $Id: hierarchy.phtml 3393 2009-06-26 14:22:14Z sebastian.dietzold $
 */

?>
<!--form name="search" method="get" action="">
	<p class="width98">
		<label class="display-block" for="hierarchy-input"><?php echo $this->_('Type to search ...') ?></label>
		<input class="inner-label text width100 live-search" type="text" id="hierarchy-input" name="q"/>
	</p>
</form-->
<?php if (!empty($this->classes)): ?>
	<ul class="bullets-none separated hierarchy">
		<?php foreach ($this->classes as $uri => $class): ?>
			<li>
			    <?php if ($class['has_children']): ?>
			        <?php if ($class['open']): ?>
			            <a class="hierarchy-toggle open"></a>
			        <?php else: ?>
			            <a class="hierarchy-toggle closed"></a>
			        <?php endif; ?>
			    <?php endif; ?>
			    <a class="Class <?php echo $class['classes'] ?>" href="<?php echo $class['url'] ?>" about="<?php echo $class['uri'] ?>">
					<?php echo $class['title'] ?>
				</a>
				<?php if ($class['has_children']): ?>
				    <?php echo $this->partial('partials/hierarchy_list.phtml', array('classes' => $class['children'], 'open' => $class['open'])) ?>
		        <?php endif; ?>
			</li>
		<?php endforeach; ?>
	</ul>
<?php else: ?>
	<p class="messagebox info"><?php echo $this->_($this->message) ?></p>
<?php endif; ?>
